Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpriteFramesEditor Fix preview grid in "Select Frames" dialog #52461

Merged

Conversation

kleonc
Copy link
Member

@kleonc kleonc commented Sep 7, 2021

Fixes #52099 (I'll probably enhance this dialog in another PR, this one is bugfix only).
Fixes #52745.
Cherry-pickable 3.x, 3.3.

Makes grid being drawn according to the frames this dialog outputs (it allows integer-only frame sizes), scaling/zooming wasn't properly taken into account. Input handling is changed accordingly too. Output frames are unchanged, the preview was broken.

Example:

Godot_v3 4-beta4_win64_mGsOKTC3rh
so the frame size is (64, 64) / (13, 11) = (4, 5)

3.4.beta4: this PR (against 3.x):
O93WQ2gDRn QcskcHrE9x
cjo3qlcwIb hvMlLyt1G7
XKQvrIGTt6 jVQhotk0ZF
cVtkUpkptT YuPPnn9f93
pswXOyGA2b WkOCVFARhL
sP3dr1zjyf 0ILJF8EZ9W

@YeldhamDev YeldhamDev added bug topic:editor cherrypick:3.3 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Sep 7, 2021
@YeldhamDev YeldhamDev added this to the 4.0 milestone Sep 7, 2021
@akien-mga akien-mga merged commit 87de2e7 into godotengine:master Sep 17, 2021
@akien-mga
Copy link
Member

Thanks!

@kleonc kleonc deleted the sprite-frames-dialog-fix-drawing branch September 18, 2021 07:24
@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 21, 2021
@akien-mga
Copy link
Member

akien-mga commented Sep 21, 2021

Cherry-picked for 3.3.4.

Edit: Undid cherry-pick as it's too much hassle to include all other commits which were needed for this to work, and I don't have bandwidth to actually test that it doesn't regress.

@akien-mga
Copy link
Member

So it's actually too much hassle to backport this fix to 3.3 as it depends on 3 previous PRs which also need to be backported, and the sum of those seem a bit too feature-packed for 3.3 IMO: #47802, #48977, #51031.

I would suggest making a dedicated PR for 3.3 with relevant fixes if need be, or we leave it at 3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants